//
//  ContentView.swift
//  SecureFieldDemo
//
//  Created by jerry on 2020/6/23.
//  Copyright © 2020 jerry. All rights reserved.
//

import SwiftUI

struct ContentView : View {
    @State private var password = ""
    var body: some View {
        VStack{
            SecureField("密码框1", text: $password)
            
            SecureField("密码框2", text: $password) {
                print("Your username is \(self.password)!")
            }
            .textFieldStyle(RoundedBorderTextFieldStyle())
        }
        .padding()
    }
}

#if DEBUG
struct ContentView_Previews : PreviewProvider {
    
    static var previews: some View {
        ContentView()
    }
}
#endif
